Article Units
Frequency:
Article unit master data changes are required to be sent in near real-time. Any change to an interface field in the external system should trigger the interface.
Expected data:
The external system is expected to report at least two levels of article units:
- Base unit (e.g., piece, kg)
- Warehouse/distribution unit (e.g., block, crate, box, distribution package)
- Layer and pallet levels are optional.
Countable articles: use piece as the base unit.
Weight articles (average or catch measure): use kg as the base unit.
For weight articles (average or catch measure), the coefficient to the warehouse/distribution unit should be equal to 1.
Technical:
The DSWMS unit hierarchy should be mapped to the external system.
If an article unit record does not exist in DSWMS, the record will be created.
If an article unit record already exists in DSWMS, the existing record will be updated with the new data.
POST https://{url}/v1/articles/units
Create or update article units.
Request Body
The request body is a JSON array of objects. Each object contains an article_id and a units array with the unit details.
Top-level object:
| Name | Type | Required | Description |
|---|---|---|---|
| article_id | string | Yes | Article unique identifier in ERP |
| units | array | Yes | Array of unit objects for the article |
Unit object (inside units array):
| Name | Type | Required | Description |
|---|---|---|---|
| unit_id | string | Yes | Unit of measure in ERP |
| coefficient | number | Yes | Conversion coefficient to a lower unit of measure |
| article_unit_type_id | integer | Yes | Unit type: 1 - base unit, 2 - warehouse unit, 3 - layer unit, 4 - pallet unit |
| gross_weight | number | Yes | Unit gross weight in kg |
| net_weight | number | Yes | Unit net weight in kg |
| height | number | Yes | Unit height in cm |
| length | number | Yes | Unit length in cm |
| width | number | Yes | Unit width in cm |
| volume | number | Yes | Unit volume in cm3 |
Request Example
[
{
"article_id": "0001",
"units": [
{
"unit_id": "PCS",
"coefficient": 1,
"article_unit_type_id": 1,
"gross_weight": 12.0,
"net_weight": 11.6,
"height": 30.5,
"length": 20.65,
"width": 11.25,
"volume": 66.5
},
{
"unit_id": "DPA",
"coefficient": 6,
"article_unit_type_id": 2,
"gross_weight": 60.0,
"net_weight": 50.6,
"height": 90.5,
"length": 120.65,
"width": 30.25,
"volume": 500.5
},
{
"unit_id": "LAY",
"coefficient": 60,
"article_unit_type_id": 3,
"gross_weight": 120.0,
"net_weight": 100.6,
"height": 140.5,
"length": 180.65,
"width": 70.25,
"volume": 800.5
},
{
"unit_id": "PAL",
"coefficient": 300,
"article_unit_type_id": 4,
"gross_weight": 240.0,
"net_weight": 200.6,
"height": 320.5,
"length": 200.65,
"width": 150.25,
"volume": 1600.5
}
]
},
{
"article_id": "0047",
"units": [
{
"unit_id": "PCS",
"coefficient": 1,
"article_unit_type_id": 1,
"gross_weight": 17.0,
"net_weight": 15.0,
"height": 12.5,
"length": 17.65,
"width": 6.25,
"volume": 555.15
}
]
}
]
Response
200: OK — Success
{
"success": true,
"message": null
}
400: Bad Request — Error
{
"success": false,
"message": "Article Unit update failed",
"errors": [
{
"article_id": "0001",
"error": "some error"
}
]
}